package core.actor.core
{
	import flash.display.Sprite;
	import flash.filters.GlowFilter;
	import flash.text.TextField;
	import flash.text.TextFormat;
	
	import flashx.textLayout.formats.TextAlign;

	public class Texts
	{
		private var _textField:TextField;
		public function Texts(textLayer:Sprite,width:int = 300)
		{
			_textField = new TextField();
			_textField.width = width;
			_textField.height = 20;
			var txtFormat:TextFormat = new TextFormat();
			txtFormat.align = TextAlign.CENTER;
			_textField.defaultTextFormat = txtFormat;
			_textField.filters = [new GlowFilter(0x00ff00)];
			textLayer.addChild(_textField);
		}
		
		public function set x(val:Number):void
		{
			_textField.x = val;
		}
		
		public function set y(val:Number):void
		{
			_textField.y = val;	
		}
		
		public function set text(val:String):void
		{
			_textField.text = val;
		}
	}
}